<include file="../header" />
<body class="J_scroll_fixed">
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script charset="utf-8" src="http://map.qq.com/api/js?v=2.exp&key=FO5BZ-2AC2G-ACAQV-I5BD3-YX65K-76BUB"></script>
    <script src="http://open.map.qq.com/apifiles/v1.0/app.js?v=1.0.131203.1" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
           
            $('button#send').click(function() {
                var finger = $('input[name=finger]').val();
                var cardNumber = $('input[name=cardNumber]').val();
                
                 //正则判断是否为数字
                if(!/^[0-9]+$/.test(finger)||finger===''||finger===null||finger===0) {
                    layer.msg('指纹应为数字且不能为空!');
                    return false;
                }
                if(!/^[0-9]+$/.test(cardNumber)||cardNumber===''||cardNumber===null) {
                    layer.msg('卡号应为数字且不能为空!');
                    return false;
                } else {
                    $("#offlineform").submit();
                }
            });

        });
    </script>
    <div class="wrap jj">
        <div class="common-form">
            <form id="offlineform" method="post" class="form-horizontal J_ajaxForm" action="{:U('vip/offlineOpenPost')}">
                <input type="hidden" name='orderId' value='{$orderId}'/>
                <fieldset>
                    
                        <div class="control-group">
                            <label class="control-label">指纹号：</label>
                            <div class="controls">
                                <input type="text" class="input" name="finger" value="{$relationship.finger}">    
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">卡号：</label>
                            <div class="controls">
                                <input type="text" class="input" name="cardNumber" value="{$relationship.card_number}">    
                            </div>
                        </div>
                   
                </fieldset>
                <div class="form-actions">
                    <button  class=" btn" id="send">开通</button>
                </div>
            </form>
        </div>
    </div>    
    <script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>